#coding=utf-8
from django.contrib import admin
from .models import YiSheng,YongHu,YanShouRen,ShengChanQiYe,GongHuoQiYe,YaoPin

# Register your models here.    
class YiShengAdmin(admin.ModelAdmin):
    list_display = ('YongHuMing','MiMa','XingMing','XingBie','LianXiDianHua','JianJie')
        
admin.site.register(YiSheng,YiShengAdmin)
    
    
    
class YongHuAdmin(admin.ModelAdmin):
    list_display = ('YongHuMing','MiMa','XingMing','XingBie','NianLing','JiuZhenRiQi',
                    'ZhuZhi','LianXiDianHua','BeiZhu')
    search_fields = ('YongHuMing','XingMing','LianXiDianHua',)
    list_filter = ('JiuZhenRiQi',)
    date_hierarchy = 'JiuZhenRiQi'
    ordering = ('-JiuZhenRiQi',)
    
admin.site.register(YongHu,YongHuAdmin)
     
    
    
class YanShouRenAdmin(admin.ModelAdmin):
    list_display = ('XingMing','LianXiDianHua')
    search_fields = ('XingMing','LianXiDianHua',)
admin.site.register(YanShouRen,YanShouRenAdmin) 
       
  

     
class ShengChanQiYeAdmin(admin.ModelAdmin):
    list_display = ('QiYeMing','LianXiDianHua','DiZhi')
    search_fields = ('QiYeMing','LianXiDianHua',)
    
admin.site.register(ShengChanQiYe,ShengChanQiYeAdmin)
    
    
     
class GongHuoQiYeAdmin(admin.ModelAdmin):
    list_display = ('QiYeMing','LianXiDianHua','DiZhi')
    search_fields = ('QiYeMing','LianXiDianHua','DiZhi')
    
admin.site.register(GongHuoQiYe,GongHuoQiYeAdmin)

 

     
class YaoPinAdmin(admin.ModelAdmin):
    list_display = ('TongYongMing','ShangPinMing','JiXing','GuiGe','ZhiLiangZhuangKuang',
                 'KuCunShengYu','PiZhunWenHao','PiHao','YouXiaoQiZhi','YanShouJieLun',
                 'BeiZhu','YanShouRen')
    search_fields = ('TongYongMing','ShangPinMing','PiZhunWenHao',)
    list_filter = ('YouXiaoQiZhi',)
    date_hierarchy = 'YouXiaoQiZhi'
    ordering = ('YouXiaoQiZhi',)
    
    

admin.site.register(YaoPin,YaoPinAdmin)
